import Vue from 'vue';
import App from '@/App.vue';
import router from '@/router';
import store from '@/store';

//全局自定义指令
import * as directives from '@/directives';
//全局过滤器
import * as filters from '@/filters';

//elementUI组件库
import '@/plugins/element';

//其他插件
import '@/plugins/plugin.install';

//全局样式文件
import '@/assets/scss/app.scss';

//路由拦截器
// import '@/permission';

Vue.config.productionTip = false;

//注册全局自定义过滤器
Object.keys(filters).forEach(key => {
	Vue.filter(key, filters[key]);
});

//注册全局自定义指令
Object.keys(directives).forEach(key => {
	Vue.directive(key, directives[key]);
});

new Vue({
	router,
	store,
	render: h => h(App),
}).$mount('#app');
